POV-Ray : Newsgroups : povray.newusers : pigment type : Re: pigment type Server Time
5 Sep 2024 20:17:09 EDT (-0400)
  Re: pigment type  
From: Ken
Date: 3 Sep 1999 07:50:51
Message: <37CFB5CC.FFF231B4@pacbell.net>
Sander wrote:
> 
> Hello Ken,
> You are quick!

I know :)

> I hope this isn't too large.
> I get 3 times the message "No pigment type given."
> It must be in the material "Kolom_M", but I don't see it.
> Thanks for your answers!
> Sander

Your example is well within the acceptable size limits for this group.

 I am not sure why you are getting that warning with your current use
of material. It really  should work from what I can tell. Anyway there
are two ways to get rid of the warnings. Either move the materials from
within the cylinder statements to the end of the union as illustrated or
remove them completely from the entire union and attach them to the objects
when they are used. I have also illustrated how this should be done.
Memory wise if you had 1000's of objects you would be better off adding
the material statement to the end of the union instead of adding them to
the individual pieces.

#declare COL = 
union{ 
  cylinder{ <0, 0, 0>,<0, 5, 0>, 30 
//    material{ Kolom_M } 
    }
  cylinder{ <0, 25, 0>, <0, 100, 0>, 22  
//    material {Kolom_M } 
    }
  scale 2
    material {Kolom_M }   }   

camera{
  location    <2600, 150, 20600>
  look_at     <5300,  50, 20000>
  angle        15
  }


object{ COL translate < 5300, 0, 20000 > }//    material {Kolom_M } }
object{ COL translate < 5800, 0, 20000 > }//    material {Kolom_M } }
object{ COL translate < 4800, 0, 20000 > }//    material {Kolom_M } }


  As far as educational purposes go you can eliminate the material statement
altogether from your scene. The material statement was added to Pov so that
you could pre-declare textures that need an interior statement i.e:

Declare Glass =
 texture {
  pigment { rgbf 1 }
    finish  { ambient .3 diffuse .12 specular 1 roughness .0001 }
 }

#declare My_Glass =
 material {
   texture { Glass }
   interior { ior 1.33 }
 }

sphere { 0,1
 material { My_Glass }
}

 There is no real reason to use it except in these cases and it was not
intended to be used otherwise. In your case you can use the texture as
a wrapper by itself without the need for the material statment being in
there.

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.